#ifndef APPLICATION_H
#define APPLICATION_H

#include <SFMLWindow.h>
#include <Entity.h>
#include <Clock.h>
#include <View.h>

#include <vector>


#include <windows.h>


/*! @brief 	Application is the Top level class. It'll create the Window, set all OpenGL value default, and manage
 *			the Update, Events and Display loop    
 */

class Application
{
    public :

    /************************************
    /*              Static
    /************************************/

        /************************************
        /*          Properties
        /************************************/

            static		int             s_Run;			/*!< The main loop will end if m_Run equal true	*/

            static      Clock           s_Clock;
			static		SFMLWindow *    s_Window;       /*!< Window linked to the application   */


            static      float           s_TimeLastFrame;   /*!< Time, in ms, where the last frame has been refreshed       */
            static      float           s_Delta;           /*!< Time, in ms, between each Frame, defined by s_Framerate    */
            static      float           s_Framerate;       /*!< Frame per second                                           */
			
            static 		sf::Event       s_CurrentEvent;		/*!< Store current Event 						*/

			
        /************************************
        /*              Methods
        /************************************/

            /*! @brief The InitializeGL method will initialize all OpenGL related component of the engine
             *         and set the most important values of a valid OpenGL Context (clear color, Z-Buffer etc)  */
            static void InitializeGL();

            /*! @brief The Init method will Start the clock         */
            static void Init();

            /*! @brief The SetWindow Method will create a new SFML Window to be used for rendering  */
            static SFMLWindow * SetWindow(int width, int height, int framerate);
			
			static void EventManagement(sf::Event event);

            /*! @brief The Loop Method will manage all things to do between two image refresh   */
            static void Loop();

            static void UpdateDisplay();
			
            /*! @brief Fire the virtual method Update of each Entity in the scene    */
            static void UpdateEntities();



    /****************************************
    /*              Construtor
    /****************************************/

        Application();
        Application(int width, int height);
};
#endif // APPLICATION_H
